var isIpad = function(){
    return (cc.winSize.width/cc.winSize.height <= 1.4);
}
var shipei = function($){
    if(isIpad()){
        if($('root')){
            $('root').setPositionY(77);
        }
        if($('bg')){
            $('bg').setPositionY(cc.winSize.height/2);
            $('bg').setScale(1.25);
        }
        if($('top')){
            $('top').setPositionY(cc.winSize.height);
        }
        if($('mask')){
            $('mask').setSize(cc.size(cc.winSize.width, cc.winSize.height));
            $('mask').setPositionY(0);
            $('mask').setBackGroundColorType(ccui.Layout.BG_COLOR_SOLID);
            $('mask').setBackGroundColor(cc.color(0, 0, 0));
            $('mask').setBackGroundColorOpacity(180);
        }
    }
};
var LoginScene = cc.Scene.extend({
    onEnter: function () {
        this._super();
        var layer = new LoginLayer();
        this.addChild(layer);

        window.maLayer = layer;
    }
});
var MainScene = cc.Scene.extend({
    onEnter: function () {
        this._super();

        var layer = new HomeLayer();
        this.addChild(layer);

        window.maLayer = layer;
    }
});

var FightScene = cc.Scene.extend({
    onEnter: function () {
        this._super();

        var layer = new FightLayer();
        this.addChild(layer);

        window.maLayer = layer;
    }
});